package com.vframework.exception;

import com.vframework.common.response.enums.ReturnEnum;

public class BaseException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private ReturnEnum resultEnum;

    public BaseException(ReturnEnum resultEnum) {
        super(resultEnum.getMsg());
        this.resultEnum = resultEnum;
    }

    public BaseException(ReturnEnum resultEnum, Throwable cause) {
        super(resultEnum.getMsg(), cause);
        this.resultEnum = resultEnum;
    }

    public ReturnEnum getResultEnum() {
        return resultEnum;
    }
}
